const mongoose = require('mongoose');
module.exports = () => {
    let schema = new mongoose.Schema({
        userId: {
            type: mongoose.Schema.Types.ObjectId,
            ref: 'WechatUser'//用户id
        },
        openId: String,//openid
        isUsed: {
            type:Boolean,
            default:false,
        },//是否使用 true 使用false 未使用
        formId:String,//formid
        deletedAt: Date,//创建日期
        createdAt: Date,
        updatedAt: Date,
    }, {collection: 'formid'});

    return schema;
};
